package bomberman.runable;

import bomberman.model.Enemy;
import bomberman.swing.BomJPanel;

/**
 * 敌人死亡线程，延时500毫秒
 * @author EX-FUHUICHAO001
 * 2016年9月26日09:50:17
 */
public class MyRunableRemoveEnemy implements Runnable {

	private Enemy enemy;
	
	public MyRunableRemoveEnemy(Enemy enemy){
		this.enemy = enemy;
	}
	
	
	public void run() {
		try {
			Thread.sleep(500);
			if(BomJPanel.enemys.contains(enemy)){
				BomJPanel.enemys.remove(enemy);
			}
		} catch (InterruptedException e) {
			e.printStackTrace();
		}
	}

	
	

	public Enemy getEnemy() {
		return enemy;
	}


	public void setEnemy(Enemy enemy) {
		this.enemy = enemy;
	}
	
}
